import request from '@/router/axios';

export const getCaseinfoCount = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/getCaseinfoCount',
    method: 'get',
  })
}

export const getCaseinfoCountAll = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/getCaseinfoCountAll',
    method: 'get',
  })
}

export const getCaseinfoToDayCount = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/getCaseinfoToDayCount',
    method: 'get',
  })
}

export const getSpecialCount = () => {
  return request({
    url: '/api/vingsoft-ywsp/specialproceduretype/getSpecialCount',
    method: 'get',
  })
}

export const getCountByProjectNo = (projectNo) => {
  return request({
    url: '/api/vingsoft-ywsp/specialproceduretype/getCountByProjectNo',
    method: 'get',
    params: {
      projectNo
    }
  })
}

export const testCase = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/testCase',
    method: 'get',
  })
}

export const getHcpUrl = (yjscaseno) => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/getHcpUrl',
    method: 'get',
    params: {
      yjscaseno
    }
  })
}

export const eleCertificateCount = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/eleCertificateCount',
    method: 'get',
  })
}


export const getNewOnlinePreviewUrl = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/getNewOnlinePreviewUrl',
    method: 'get',
  })
}

export const getSlzxUrl = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/getSlzxUrl',
    method: 'get',
  })
}

export const getPortalUrl = () => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/getPortalUrl',
    method: 'get',
  })
}

export const caseInfoResultPage = (current, size, params, ascs, descs) => {
    return request({
        url: '/api/vingsoft-ywsp/proCaseInfo/caseInfoResultPage',
        method: 'get',
        params: {
            ...params,
            current,
            size,
            ascs,
            descs
        }
    })
}

export const processFormToWordOrPdf = (itemId, rowGuid, formId, projectNo) => {
    return request({
        url: '/api/vingsoft-ywsp/proCaseInfo/processFormToWordOrPdf',
        method: 'post',
        params: {
            itemId,
            rowGuid,
            formId,
            projectNo,
        }
    })
}

export const licenseRetrieval = (row) => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/licenseRetrieval',
    method: 'get',
    params: row
  })
}

export const licenseDetailByLicenseId = (licenseId, projectNo, taskHandleItem) => {
  return request({
    url: '/api/vingsoft-ywsp/proCaseInfo/licenseDetailByLicenseId',
    method: 'get',
    params: {licenseId,projectNo, taskHandleItem}
  })
}